package struct.decorator.original;

/**
 * 装饰器类
 */
public class Decorator extends Component {

    protected Component component;

    public void setComponent(Component component) {
        this.component = component;
    }


    @Override
    public void operation() {
        if (component != null) {
            component.operation();
        }
    }
}
